// src/api/account/account.types.ts
import type { Result } from '../response.type'

type PrivacyAttribute = 'PUBLIC' | 'PRIVATE' | 'FRIENDS_ONLY'

interface PrivacyAttributes {
  work: PrivacyAttribute
  follow: PrivacyAttribute
  like: PrivacyAttribute
  favorite: PrivacyAttribute
}

export interface User {
  id: string
  username: string
  avatar: string
  email: string
  gender: 'M' | 'F' | 'OTHER'
  privacy_attributes: PrivacyAttributes
}

export interface LoginForm {
  username: string
  password: string
}

export interface LoginResponse {
  access_token: string
  expires_in: number
  refresh_expires_in: number
  refresh_token: string
  token_type: string
  'not-before-policy': number
  session_state: string
  scope: string
}

export interface RegisterForm {
  username: string
  password: string
  email: string
  code: string
  avatar: string
  gender: string
}

export type RegisterResponse = Result<string>
